﻿// <copyright file="ITriple.cs" company="Alan Dean">
// The MIT License

// Copyright (c) 2008 Alan Dean

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// </copyright>
// <author>Alan Dean</author>
// <email>alan.dean@thoughtpad.net</email>

namespace Semantic.Rdf
{
    using System;
    using System.Diagnostics.CodeAnalysis;

    /// <summary>Defines the RDF triple interface.</summary>
    /// 
    /// <remarks>
    /// <para>
    /// An RDF triple contains three components:
    /// <list type="bullet">
    /// <item>
    /// the subject, which is an <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>
    /// or a <see href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node">blank node</see>
    /// </item>
    /// <item>
    /// the predicate, which is an <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>
    /// </item>
    /// <item>
    /// the object, which is an <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>,
    /// a literal or a <see href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node">blank node</see>
    /// </item>
    /// </list>
    /// </para>
    /// <para>
    /// An RDF triple is conventionally written in the order subject, predicate, object.
    /// </para>
    /// <para>The predicate is also known as the property of the triple.</para>
    /// </remarks>
    /// 
    /// <seealso href="http://www.w3.org/TR/rdf-concepts/#section-triples">RDF Triples</seealso>
    public interface ITriple
    {
        #region IUriReference Subject
        /// <summary>
        /// Gets the subject of the triple.
        /// </summary>
        /// 
        /// <value>
        /// An <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>
        /// or a <see href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node">blank node</see>.
        /// </value>
        IUriReference Subject
        {
            get;
        }
        #endregion

        #region IUriReference Predicate
        /// <summary>
        /// Gets the predicate of the triple.
        /// </summary>
        /// 
        /// <value>
        /// An <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>.
        /// </value>
        IUriReference Predicate
        {
            get;
        }
        #endregion

        #region object Object
        /// <summary>
        /// Gets the object of the triple.
        /// </summary>
        /// 
        /// <value>
        /// An <see href="http://www.w3.org/TR/rdf-concepts/#dfn-URI-reference">RDF URI reference</see>,
        /// a literal or a <see href="http://www.w3.org/TR/rdf-concepts/#dfn-blank-node">blank node</see>.
        /// </value>
        [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Object", Justification = "This is deliberate.")]
        object Object
        {
            get;
        }
        #endregion
    }
}